#include <iostream>
#include <vector>
using namespace std;

// 已知
int n;
// 未知
vector<string> a;

void dfs(int x)
{
    int y = n - x - 1;
    if (x > y) return;
    for (int i = x; i <= y; ++i)
    {
        a[i][x] = a[x][i] = a[y][i] = a[i][y] = '#';
    }
    dfs(x + 2);
}

int main()
{
    cin >> n;
    for (int i = 0; i < n; ++i)
    {
        a.push_back(string(n, '.'));
    }
    dfs(0);
    for (int i = 0; i < n; ++i)
    {
        cout << a[i] << endl;
    }
    return 0;
}